The past two decades have seen the development of several constraint-based models of phonological grammar that can handle variable phenomena. Most of these models, however, are purely grammatical, and do not allow for the contribution of non-grammatical factors towards determining the frequency structure of variation. This paper reviews different approaches to phonological variation, focusing on how grammatical and non-grammatical factors co-determine patterns of variation. Based on this review, a model is developed that incorporates influences from both grammatical and non-grammatical factors. The proposed model is grammar-dominant, in the sense that grammar defines the space of possible variation while non-grammatical factors only contribute towards the frequency with which the grammar determined forms are observed. Following Coetzee & Kawahara (2013), the model is developed in a version of noisy Harmonic Grammar that allows non-grammatical factors to scale the weights of faithfulness constraints up or down.